define(function (require, exports, module) {
    "require:nomunge,exports:nomunge,module:nomunge";

    var app = require('mokit/app');
    var UCenterView = require('../views/ucenter-collect-list');
    var commonUtils = require('../common/utils');
    var Ucollect = require('../models/Ucollect');
    var nav = require("mokit/navigation");

    /**
	 * 社友录页面控制器
	 */
    return app.controller.create({
        isSetting: true,
        /**
		 * 默认action
		 */
        index: function (context) {
            var self = this;
            Ucollect.getList(context.routeData.type||Ucollect.args.type, function(){
	            	self.setView(new UCenterView({
	            		model: Ucollect
	            	}));	
            });

        },
        
        //查看收藏
        showItem: function(context, type, id){
			var uri = ["/article/info","/project/info","/works/info","/provider/info/"][type] + "/" + id;
			this.go(context, uri, nav.getUri());
        }
    });

});